package com.example.mybatisdemo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.example.mybatisdemo.service.AgentService;
import com.example.mybatisdemo.util.JsonUtil;

@RestController
public class AgentController {

	@Autowired
	private AgentService agentService;

	/**
	 * 代理筛选条件列表
	 * 
	 * @author liujp 2019年4月17日
	 * @return
	 */
	@RequestMapping("/agent.list.get")
	public String getAgentList(@RequestParam(name = "name", required = false) String name) {
		return JsonUtil.toJsonStr(agentService.getList());
	}


}
